#ifndef HSL_HEURISTIC_SELECTOR_H
#define HSL_HEURISTIC_SELECTOR_H

#include "Config.h"
#include "DecisionMaker.h"
#include "Selected.h"
#include "Heuristic.h"
#include "None.h"
#include <cassert>

// The HeuristicSelector class needs a variable number of template 
// arguments. This is implemented in a typical way that uses
// partial template specialization. For a simple example
// of this technique, see http://goo.gl/F3Zw7
// 
// FUTURE (C++0x): Can use variadic templates for a simpler 
// implementation.

template <typename H, template<class> class S, typename F1 = None, 
          typename F2 = None, typename F3 = None>
class HeuristicSelector;

/// The base class of all classes that implement the selection of heuristics 
/// using zero features for selection.  
///
/// A HeuristicSelector with:
/// - output Heuristic class H, 
/// - Selected output container template class S<class>
template <class H, template<class> class S>
class HeuristicSelector<H, S>: public DecisionMaker<H, S>
{
public:
    void registerHeuristic(H heuristic);
    S<H> select(); 
};

/// The base class of all classes that implement the selection of heuristics 
/// using one feature for selection.  
///
/// A HeuristicSelector with:
/// - output Heuristic class H, 
/// - Selected output container template class S<class>,
/// - Input Feature class F1 used for selection,  
template <class H, template<class> class S, class F1>
class HeuristicSelector<H, S, F1>: public DecisionMaker<H, S, F1>
{
public:
    void registerHeuristic(H heuristic);
    S<H> select(const F1& /*input*/);
};

#endif
